/*职业配置*/
/*
level 职业等级 角色等级/250 对应职业等级
nextJob 下一个等级的职业
equipType  装备类型
attr  职业附加副属性（参照ManagerRoleData.js）  speed 必备
face 头像
pf   形象
*/
window._JOB = {

	//#######################皮甲职业
	"无业":{level:0,attr:{speed:75,move:3},equipType:['刀','皮','宝','宝','宝'],xw:{}
			,xz:{attack:1,mattack:1,defend:1,mdefend:1,maxHp:1},face:'至尊宝',pf:'武术家',color:"#B2B2B2",sname:'无',
			desc:'干啥啥不行,吃饭第一名'
		},
	//远程输出
	"射手":{level:0,attr:{speed:80,move:2},equipType:['弓','皮','宝','宝','宝'],xw:{}
			,xz:{attack:1.1,mattack:1,defend:1,mdefend:1,maxHp:0.9},face:'飞箭羽',pf:'武术家',color:"#70FFE0",sname:'射',
			desc:'打完我就跑,嘿嘿'},
	//爆发
	"刺客":{level:0,attr:{speed:100,move:3},equipType:['剑','皮','宝','宝','宝'],xw:{}
			,xz:{attack:1.1,mattack:1,defend:0.9,mdefend:1,maxHp:1},face:'魅影客',pf:'武术家',color:"##FF7CB8",sname:'刺',
			desc:'神出鬼没,千里之外取人性命'},
	"盗贼":{level:0,attr:{speed:90,move:2},equipType:['弓','皮','宝','宝','宝'],xw:{}
			,xz:{attack:1,mattack:1,defend:1,mdefend:1,maxHp:1},face:'风行者',pf:'武术家',color:"#00C423",sname:'盗',
		desc:'捡漏专家,以战养战'},
	
	//#######################重甲职业
	//近战输出
	"战士":{level:0,attr:{speed:80,move:3},equipType:['枪','重','宝','宝','宝'],xw:{}
			,xz:{attack:1.1,mattack:0.9,defend:1,mdefend:1,maxHp:1},face:'武剑心',pf:'武术家',color:"#FF0000",sname:'战',
		desc:'真男人就是要真刀真枪的干！'},
	//肉盾 保护卡位
	"护卫":{level:0,attr:{speed:65,move:3},equipType:['刀','重','宝','宝','宝'],xw:{}
			,xz:{attack:1,mattack:0.9,defend:1.1,mdefend:0.9,maxHp:1.1},face:'石断岳',pf:'武术家',color:"#FFB35A",sname:'护',
		desc:'爱吐槽,护小弟,狂化一开我怕谁'},
	//全能型
	"首领":{level:0,attr:{speed:80,move:3},equipType:['剑','重','宝','宝','宝'],xw:{}
			,xz:{attack:1,mattack:1,defend:1,mdefend:1,maxHp:1.1},face:'庄聚贤',pf:'武术家',color:"#FFE564",sname:'首',
		desc:'一般情况下我不出手,我一出手要人命'
		},
	//双修 变身
	"魔战士":{level:0,attr:{speed:85,move:2},equipType:['枪','扇','重','宝','宝'],xw:{}
	,xz:{attack:1.1,mattack:1.1,defend:1,mdefend:1,maxHp:0.8},face:'龙太子',pf:'武术家',color:"#C370FF",sname:'魔',
    desc:'看我七十二变！'},

	//#######################布甲职业
	//掉落专精 下毒
	//法术输出
	"法师":{level:0,attr:{speed:75,move:2},equipType:['扇','布','宝','宝','宝'],xw:{}
			,xz:{attack:1,mattack:1.1,defend:1,mdefend:1,maxHp:0.9},face:'道玄尘',pf:'武术家',color:"#00FFF0",sname:'法',
			desc:'无他,唯范围广'
		},
	//恢复
	"医师":{level:0,attr:{speed:70,move:2},equipType:['杖','布','宝','宝','宝'],xw:{}
	,xz:{attack:1,mattack:1,defend:1,mdefend:1,maxHp:0.9},face:'青阳仙',pf:'武术家',color:"#FFB762",sname:'医',
	desc:'惹毛了我我是真的会裂开啊'},
		//特殊功能 召唤 
	"方士":{level:0,attr:{speed:65,move:2},equipType:['杖','布','宝','宝','宝'],xw:{}
	,xz:{attack:1,mattack:1,defend:0.9,mdefend:1.1,maxHp:1},face:'梦神机',pf:'武术家',color:"#FF72B9",sname:'方',
	desc:'剥壳猛大师说的就是我'},
}	


window.JOBHELPER = {

	initJobItem:function(){

		var result ="";

		for(var key in _JOB){
			if(_JOB[key].level==1){
				var obj = _CU.cloneObj(_FIGHTITEM['飞骑兵之证']);
				obj.job = key;
				obj.des = "将角色职业改为:"+key;
				result+='\"'+key+'之证\":'+JSON.stringify(obj)+",\n";
			}
		}

		console.log(result);
	},

    getJobDesc:function(job){

        var jobConfig = _JOB[job];

        var desc = "职业:"+job+"("+jobConfig.level+"阶)";
		//if(jobConfig.skillType&&jobConfig.skillType.length>0)
		//	desc+="\n技能:"+jobConfig.skillType.join(',');
        //desc+="\n"+_IOF.getAttrString(jobConfig.attr);
		desc+=" 速度:"+jobConfig.attr.speed;
		desc+="\n成长:攻击"+jobConfig.xz.attack+" 防御"+jobConfig.xz.defend+" 精神"+jobConfig.xz.mattack+" 魔抗"+jobConfig.xz.mdefend+" 生命"+jobConfig.xz.maxHp;
		desc+="\n装备:"+jobConfig.equipType.join(",");
		desc+="\n"+XWH.getStrOfXwObj(jobConfig.xw);

		var jobskill = _CROF.getSkillOfJob(job);
		if(jobskill&&_SKILLBD[jobskill]){
			desc+="\n"+jobskill+"[职业被动]:\n"+_IOF.getAttrString(_SKILLBD[jobskill].attr).replaceAll("\n"," ");
		}
		desc+="\n"+jobConfig.desc;
        return desc;
    },

    getJobLevelOfLV:function(lv){
        if(lv<250){
            return 1;
        }else if(lv<500){
            return 2;
        }else if(lv<750){
            return 3;
        }
        return 4;
    }

}